jsun.run(function(){
/////////////////////////////////////////////

    function SetWord() {
        jsun.swap.CatalogDictionary.Rec = this.firstChild.textContent;
        if (jsun.swap.CatalogDictionary.Row)
           jsun.swap.CatalogDictionary.Row.setAttribute('class', '');
        this.setAttribute("class", "SetWord");
        jsun.swap.CatalogDictionary.Row = this;

        var field = jsun('#RecTable').getAttribute('data-field');
        var value = encodeURIComponent(this.firstChild.textContent);
        var param = 'u=Index/CatalogSearch'
                + '&field_id=' + field
                + '&value=' + value;

        Search(param, field, value);
    }

    function Search(param, field, value) {

         var pref = "CatalogResult",
            param = "u=Index&m=Index\\Catalog/SearchResult"
                + '&field_id=' + field
                + '&value=' + value;

        jsun.swap[pref].Page = 1;
        jsun.swap[pref].Req = param;
        jsun.swap[pref].Start();

    }

    var body = jsun('#RecTable').firstChild;
    for (var i = 1; i < body.childNodes.length; ++i) {
        jsun.dom.mix(body.childNodes[i]).event({onclick: SetWord});
    }

//////////////////////////////////////////////
});